import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);
const routerPush = VueRouter.prototype.push;
VueRouter.prototype.push = function (location) {
	return routerPush.call(this, location).catch((error) => error);
};
// Router
const routes = [
	{
		path: '/',
		component: () => import('@/views/index.vue'),
		children: [
			{
				path: '/',
				name: 'element',
				component: () => import('@/views/element.vue')
			}
			,
			{
				path: '/antDesign',
				name: 'antDesign',
				component: () => import('@/views/antDesign.vue')
			}
		]
	}
]

const router = new VueRouter({
	mode: 'history',
	routes,
})

export default router;
